'''
@project:pythonProjectT174
@auther:zhongyingjie
@file:run_all_testcases.py
@date:2022/11/21 16:55
@desc:
'''
import os.path,shutil

import pytest
html_report='C:\\Users\\xfcy\\PycharmProjects\\pythonProjectT174\\pytest_demo_T174\\reports\\html_report'
json_report='C:\\Users\\xfcy\\PycharmProjects\\pythonProjectT174\\pytest_demo_T174\\reports\\json_report'


if os.path.isdir(json_report):
    shutil.rmtree(json_report)

pytest.main(["-v","--alluredir=%s" % json_report])
os.system("allure generate %s -0 %s --clean" %(json_report,html_report))
pytest.main(['-s'])